<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
  <% String path = request.getContextPath();
    	String basePath = request.getScheme()+"://" +request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>欢迎登录后台管理系统</title>
<link href="css/loginstyle.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="js/jquery.js"></script>
<script src="js/cloud.js" type="text/javascript"></script>

<script language="javascript">
	$(function(){
		
	
    $('.loginbox').css({'position':'absolute','left':($(window).width()-692)/2});
	$(window).resize(function(){
    $('.loginbox').css({'position':'absolute','left':($(window).width()-692)/2});
    })
    $("#pic").click(function(){
			$("#pic").attr("src","./Kaptcha?"+Math.floor(Math.random()*100));
		})
		$("#sum").click(function(){
			var regex=/^[0-9]{6,16}$/;
			var username=$("#username").val();
			var password=$("#password").val();
			var code=$("#code").val();
			if(!username){alert("请输入用户名"); return}
			if(!password){alert("请输入密码"); return}
			if(!regex.test(password)){
				$("#password").val('');
				alert("密码必须为6-16位的数字");
				return
			}
			if(!code){alert("请输入验证码"); return}
			$("#form").submit();
		})
});
</script> 

</head>

<body style="background-color:#1c77ac; background-image:url(images/light.png); background-repeat:no-repeat; background-position:center top; overflow:hidden;">



    <div id="mainBody">
      <div id="cloud1" class="cloud"></div>
      <div id="cloud2" class="cloud"></div>
    </div>  


<div class="logintop">    
    <span>欢迎登录后台管理界面平台</span>    
    <ul>
    <li><a href="#">回首页</a></li>
    <li><a href="#">帮助</a></li>
    <li><a href="#">关于</a></li>
    </ul>    
    </div>
    
    <div class="loginbody">
    
    <span class="systemlogo"></span> 
       
    <div class="loginbox" style="width:700px">
    <form action="UserServlet?action=backlogin" method="post" id="form">  
    <ul>
    <li><input id="username" name="username" type="text" class="loginuser" /></li>
    <li><input id="password" name="password" type="text" class="loginpwd" /></li>
    <li style="width:350px"><input type="text" name="code" id="code" placeholder="请输入验证码" style="width:187px;height:37.5px;vertical-align:middle;"/>
		<img alt="点击更换" src="./Kaptcha" id="pic" style="width:150px;vertical-align:middle;"/>
    </li>
    <li><input id="sum" type="button" class="loginbtn" value="登录" /><label>
    <input name="remember" type="checkbox"/>记住密码</label><label><a href="#">忘记密码？</a></label></li>
    </ul>
    </form>
    
    </div>
    
    </div>

    <div class="loginbm">版权所有  2013  <a href="http://www.uimaker.com">uimaker.com</a>  仅供学习交流，勿用于任何商业用途</div>
	
    
<div style="display:none"><script src='http://v7.cnzz.com/stat.php?id=155540&web_id=155540' language='JavaScript' charset='gb2312'></script></div>
</body>
</html>
